package utils;

import java.util.Properties;

import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.TableIdentifier;

public class MDmsReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy{

       

        public MDmsReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) {
                super(delegate);

        }

        public String columnToPropertyName(TableIdentifier table, String column) {
                return column.toLowerCase();
        }

       
        public Properties getTableIdentifierProperties(TableIdentifier identifier) {
                Properties properties = new Properties();    
                properties.put("sequence", "SEQ_"+identifier.getName());    
                return properties;
        }

        @Override
        public String getTableIdentifierStrategyName(TableIdentifier tableIdentifier) {
                return "sequence-identity";
                //return super.getTableIdentifierStrategyName(tableIdentifier);
        }
}

